Alex Bowden

5 Reputation

0 Badges

7 years, 199 days

MaplePrimes Activity


These are replies submitted by Alex Bowden

@tomleslie 

"Your view seems to be that this syntax should always represent multiplication."

Why does it seem that.  I've newer suggested that.  Nor do I think it.

I'm perfectly happy for footle(x+1) to always be a function call.  

Or for it to be always be a multiplication.

Or for it to be either depending on prior or environmental binding of the name.

 

There are, however two things that I think are unacceptable

1) Is for a bracket enclosed expression to be treated as a function call

(1+x)(1-x) being a function call is abusrd

Maple knows 4 is a numeric constant so it handles 4(x+1) without assuming that 4 its a function call.  So why the dogma that (x-1)(x+1) must be a function call?

Whatever useful meaning that it actually has is distinct from any other useage as either an expression or a function's parameters and so can reasonably have its own distinct syntax.

2) is for space between already distinct syntactic elements to change meaning

 ( 1 + x ) ( 1 - x ) being different from ( 1 + x )( 1 - x ) is absurd

 

 

 

 

 

 

 

@tomleslie 

You might like to think about the fact that every other sematic analyser used in modern computer languages treats space between elements that would be distinct without the space, as none significant.

Please explain why all other software architects are wrong and you are right.

@Christopher2222 

"Didn't you get the memo?"

I've just pasted (x-1)(x+1) in and there was no memo.

"I can't think of an example where one types an equation in brackets multiplied by something else in brackets and expects it to be a function"

exactly

"...so I see where your confusion is."

I stopped being confused after TimLesslie's original response.

It's clear to me that it was the system architect responsible for Maple's parser that was confused.

 

@vv 

“You refuse to try to understand the problem…”

I raised the question when Maple told me that (x-1)(1+x) was x(1 + x) - 1

I didn’t understand Maple’s stupidity until tomleslie explained it’s interpretation

I then asserted that that interpretation was a problem   

You seem to fail to understand that is, by example, "the problem".  Instead you seem to think that the problem is that it would be hard to change it.

 

It’s you that was confused and thought that not having this disfunction would have made generic functions impossible.  They would simply have required syntax / semantics that did not conflict with standard mathematical notation.

It’s you that was confused and thought that I hated the explicit multiplication operator

It’s you that fails to see the bigger picture which is that human factors are essential in software interface design.

 

Humans need consistency with the 1) domain terminology, 2) within a system, and 3) with general use 

 

Lets see how Maple is failing in this example on these.

 

1) domain terminology

(x-1)(x+1) without a space, in mathematics is the product of two simple expressions. 

Nobody would assume that (x-1) was a function any more than they would assume that (x+1) was a variable.

 

2) within the system

why would anyone expect the first bracketed expression to be treated differently from the second.

And why is the 4 in 4(x+y) treated differently then the 4 in x(4+y)

Functions and operators are equivalent.  The distinction is just semantic sugar.  4 in the first is an undefined function then why isn’t the 4 in the second, an undefined variable?

 

3) with general use.  

See if you can make a list of real world human targeted software syntax usages which make space between elements which would have been separate elements anyway without the space, have significance.

It’s likely to be a very short list.  Because it’s a really stupid thing to do.  Particularly stupid in a proprietary language presented in a listener that by default uses proportional fonts.  Think about it.

 

“…you do not have a constructive solution.”

I haven't a non constructive solution either.

Why would I propose a solution when people are being defensive about the existence of the problem.   Anyway I’m not suggesting that it be changed.  It’s clearly too late for that.  I’m just expressing exasperation at the stupidity of what was done.

 

It’s very nice for you that you prefer Maple’s usage to that of another systems that I have not expressed, or indeed hold, an option about.

 

“So, let's stop here.”

I was perfectly happy for you to stop after your first misunderstanding.

@tomleslie 

I have not suggested that a(x+1) isn't ambiguous.

The issue is with (1-x)(1+x)  

On the other hand I would not consider 4(1+x) to be ambiguous

Maple doesn't consider 4  +  3 + x to be ambiguous.  It gives 7 + x.

But if 4 could be a function then it could also be a variable.

What would you expect (1 + 2)(3 + 4)(5 + 6)(7 + 8)  to be

It doesn't look the slightestbit ambiguous to me.  

But ask 1000 PhD's the value, and I doubt that one of them will suggest 3     

 

 

 

 

 

 

@Rouben Rostamian  

"The mathematical notation (a+b)(x) is inherently ambiguous—is that a multiplication or function application?"

No

a(b+x) might is inherently ambiguous for exactly that reason.

but (a+b)(x) only becomes ambiguous because of the decision of the system architects to use an ambiguous mechanism for function definition.

"I don't think that it is possible to design rules that satisfactorily resolve all cases."

I don't think it's would be easy to make a worse attempt.

This one reminds be a Fortran programmer who we sacked many years ago, who used to name variables things like DO99I and then write assignments like DO 99 I = 1.10  

Apparently it proved he was clever.

There is nothing clever about defining (x + 1)(x - 1) to have a radically different meaning that the one that 99.9% of people with technical PhDs would expect.

There was no need to denote inline defined functions in that manner

It is amateurish system design. 

 

 

 

@acer 

I'm not currently is a position to check, perhaps I have, but this is a red herring.

My issue was and remains that...

"I hate the fact that this is the default and that those who are unaware of this highly cryptic hijacking of standard mathematical notation, or who on an occasion just forget, run the risk of using a garbage answer."

What kind of system architect would make a space between two sets of parentheses be a critical part of the semantic meaning of an expression, in order to dig themselves out of the stupidity of having used the the same notation for in line defined function as for normal mathematical expressions.

 

@vv 

'If you really hate the explicit multiplication operator..."

I don't.

I hate the fact that I have to explicity enter something different from Maple's own mathematically standard output, to mean the same thing.

I hate the fact that this is the default and that those who are unaware of this highly cryptic hyjacking of standard mathematical notation, or who on an occasion just forget, run the risk of using a garbage answer.

And since there was no necessity to create this conflict in order to implement generic functions, I hate the fact that this was how it was done.

There is only ambiguity because the implementors created ambiguity.

If (x-1)(1+x) were inherently ambiguous, why would Maple output it to me on the previous line? 

@vv 

I have no issue with generic functions.

It's the conflict of the chosen denotation for generic functions which conficts with existing mathematicalnotation and Maple's own output notation which is the issue.

@tomleslie 

Thank you for the clear and clearly correct reply.

When I proposed early onset dementia I was thinking of myself.

It is now clear that it is early onset dementia of the system architect who allowed, by default, a perfectly standard and extremly common mathematical notation to take a gratuitously different meaning in input, than it has on output in the same part of the system.

The worst type of bugs are bugs in the specification.  They rarely get fixed. 

Page 1 of 1